<!DOCTYPE html>
@args String title = "ActFramework+ActiveRecord+AAA Demo Application"
<html>
<head>
  <title>@title</title>
  <meta charset="utf-8">
  <link rel="stylesheet" media="screen" href="/asset/css/app.css">
  @render("header_css")
  <style>
    #HEADER {
      font-size: 30px;
      line-height: 80px;
    }
    #SUCCESS {
      background-color: green;
      color: white;
      padding: 10px;
    }
    #ERROR {
      background-color: red;
      color: white;
      padding: 10px;
    }
  </style>
  <script src="/asset/js/jquery-1.11.3.min.js"></script>
  @render("header_js")
</head>
<body>
@if(_flash.get("success")) {
<div id="SUCCESS">@_flash.get("success")</div>
}
@if(_flash.get("error")) {
<div id="ERROR">@_flash.get("error")</div>
}
<div id="HEADER">Simple Question and Answers (play-aaa demo)</div>
<hr />
@args User me
<a href="/">Index</a>
|
@if(me) {
Welcome, @me
<a href="/profile">Edit profile</a>
<a href="/logout">Logout</a>
} else {
<a href="/register">Register</a>
<a href="/login">Login</a>
}
|
<a href="/question/new">Ask question</a>
<hr />
@render()

@if(me) {
<hr />
<div id="DEBUG">
  <ul>
    <li>name</li>
    <li>roles</li>
    <li>privilege</li>
  </ul>
</div>
}
</body>
</html>